//
//  CommendTableViewCell.m
//  GoodWayClient
//
//  Created by HuiDong on 15/12/3.
//  Copyright © 2015年 HuiDong. All rights reserved.
//

#import "CommendTableViewCell.h"
#import "Event.h"

@interface CommendTableViewCell ()
@property (weak, nonatomic) IBOutlet UILabel *reason;
@property (weak, nonatomic) IBOutlet UILabel *achieve;
@property (weak, nonatomic) IBOutlet UILabel *time;

@end

@implementation CommendTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
+ (instancetype) CommendWithTableView:(UITableView *)tableView
{
    static NSString *identifier = @"cell";
    CommendTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
    if (cell == nil) {
        cell = [[[NSBundle mainBundle] loadNibNamed:@"CommendTableViewCell" owner:nil options:nil] lastObject];
    }
    return cell;
}

- (void)setDic:(NSDictionary *)dic
{
    _dic = dic;
    Event *event = [[Event alloc] initWithDic:dic];
    self.reason.text = [NSString stringWithFormat:@"%@",event.Title];
    self.achieve.text = [NSString stringWithFormat:@"%@",event.Description];
    self.time.text = [NSString stringWithFormat:@"%@",event.CreateTime];
}


@end
